<?php

namespace common\models\credit_app_tables;

use Yii;

/**
 * This is the model class for table "{{%task}}".
 *
 * @property integer $task_id
 * @property string $task_type
 * @property integer $task_releid
 * @property string $task_info
 * @property string $task_status
 * @property integer $task_addtime
 * @property integer $task_dotime
 */
class Task extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%task}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_app');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['task_type', 'task_releid', 'task_info', 'task_addtime', 'task_dotime'], 'required'],
            [['task_releid', 'task_addtime', 'task_dotime'], 'integer'],
            [['task_info', 'task_status'], 'string'],
            [['task_type'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'task_id' => Yii::t('app', 'Task ID'),
            'task_type' => Yii::t('app', '同步类型'),
            'task_releid' => Yii::t('app', '相关ID'),
            'task_info' => Yii::t('app', 'Task Info'),
            'task_status' => Yii::t('app', 'Task Status'),
            'task_addtime' => Yii::t('app', 'Task Addtime'),
            'task_dotime' => Yii::t('app', 'Task Dotime'),
        ];
    }
}
